//
//  OtherTurnCollectionViewCell.m
//  SIqICalendar
//
//  Created by sunjiawen on 17/3/9.
//  Copyright © 2017年 sjw. All rights reserved.
//

#import "OtherTurnCollectionViewCell.h"

@implementation OtherTurnCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self addSubviews];
    }
    return self;
}

- (void)addSubviews
{

    CGFloat turnNameLabelSize = 40;
    //轮班名称
    self.turnNameTextLabel = [[UILabel alloc] initWithFrame:CGRectZero];
    self.turnNameTextLabel.backgroundColor = [UIColor clearColor];
    self.turnNameTextLabel.font = [UIFont boldSystemFontOfSize:25.f];
    self.turnNameTextLabel.textColor = [UIColor whiteColor];
    self.turnNameTextLabel.textAlignment = NSTextAlignmentLeft;
    self.turnNameTextLabel.numberOfLines = 1;
    [self.turnNameTextLabel setAdjustsFontSizeToFitWidth:YES];
    [self.contentView addSubview:self.turnNameTextLabel];
    
    [self.turnNameTextLabel makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(15);
        make.centerY.equalTo(self.centerY);
        make.width.equalTo(150.f);
    }];
    
    
    //当天班
    self.roundTextLabel = [[UILabel alloc] initWithFrame:CGRectZero];
    self.roundTextLabel.backgroundColor = [UIColor clearColor];
    self.roundTextLabel.font = [UIFont boldSystemFontOfSize:defaultFont + 2];
    self.roundTextLabel.textColor = [UIColor whiteColor];
    self.roundTextLabel.textAlignment = NSTextAlignmentCenter;
    self.roundTextLabel.numberOfLines = 1;
    
    [self.contentView addSubview:self.roundTextLabel];
    
    [self.roundTextLabel makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.centerY);
        make.right.equalTo(self.right).offset(-10);
        make.height.equalTo(turnNameLabelSize);
    }];
}
@end
